<?php

$urlList = [
    "https:/static.mengkang.net?a=upload/image/2019/0907/1567834464450406.png",
    "static.mengkang.net",
//    "https:///static.mengkang.net",
    "http://static.mengkang.net/?a=upload/image/2019/0907/1567834464450406.png",
    "https://static.mengkang.net?a=upload/image/2019/0907/1567834464450406.png",
    "http://static.mengkang.net:8080/upload/image/2019/0907/1567834464450406.png?a=b#test",
];

foreach($urlList as $k => $url) {
    echo "\n================== case", $k+1, " ==================\n";
    $cmd = "./mywget ".$url;
    echo $cmd;

    echo "\n==================测试结果==================\n";
    $fp = popen($cmd,"r");
    echo stream_get_contents($fp);

    fclose($fp);
}


